﻿{include file="public/header"/}
{load href="/public/static/Content/ThemesBusiness/FormPage.css"}
<form id="formState" style="width:95%; text-align:center;">
    <table class="form_table" width="860px" style=" margin:0 auto;">
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                软件名称
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" name="name" value="{$info.name}" style="width:600px;"
                      data-options="required:true,tipPosition:'right'," />
            </td>
        </tr>
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                软件版本
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text"  style="width:600px;"
                      name="version" value="{$info.version}" data-options="required:true,tipPosition:'right'," />
            </td>
        </tr>
      
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                使用单位
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" name="company" style="width:600px;"
                       value="{$info.company}" data-options="required:true,tipPosition:'right'," />
            </td>
        </tr>
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                软件地址
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" name="link" style="width:600px;"
                       value="{$info.link}" data-options="required:true,tipPosition:'right'," />
            </td>
        </tr>
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                运行状态
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <select class="easyui-combobox"  name="status" data-options="required:true,tipPosition:'right'," style="width:152px;">
                	
                	<option value="1" {if condition="$info.status eq 1"} selected="selected" {/if}  >正常</option>
                	
                	<option value="0"  {if condition="$info.status eq 0"} selected="selected" {/if} >关闭</option>
                   
                </select>
            </td>
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                报修功能
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <select class="easyui-combobox"  name="fix_status" data-options="required:true,tipPosition:'right'," style="width:152px;">
                	<option value="1" {if condition="$info.fix_status eq 1"} selected="selected" {/if}  >关闭</option>
                	<option value="0"  {if condition="$info.fix_status eq 0"} selected="selected" {/if} >开启</option>
                </select>
            </td>
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                软件介绍
            </th>
            <td colspan="5" style="width:580px;padding-left:8px; height:150px;" class="form_td form_td_content">
                <textarea class="easyui-validatebox" name="sys_desc" style="height:150px;width:582px;"
                          data-options="tipPosition:'right'">{$info.sys_desc}</textarea>
            </td>
        </tr>
        <tr class="form_tr">

            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                标签激活介绍
            </th>
            <td colspan="5" style="width:580px;padding-left:8px; height:150px;" class="form_td form_td_content">
                <textarea class="easyui-validatebox" name="active_desc" style="height:150px;width:582px;" data-options="tipPosition:'right'">{$info.active_desc}</textarea>
            </td>

        </tr>
       
        <tr class="form_tr">
            <td class="form_button_panel" colspan="6" style="padding-right:8px">
                
                <a  id="save"  class="easyui-linkbutton form-toolbar-button" data-options="iconCls:'icon-save'">保存</a>
              
            </td>
        </tr>
    </table>
</form>
<script>
   $(function() {
       $("#save").on("click",function(){
                $.ajax({
                       type: 'POST',
                       url: "{:url('admin/system/save')}",
                       data:  $("#formState").serialize(),
                       dataType: "json",
                       async: false,
                    error: function(request) {
                        alert("发送请求失败！");
                    },
                   success: function(data){
                        if (data.status == 1) {          
                            $.messager.alert('提示', data.msg, 'info');
                            location.reload();
                              //closeDialog();
                        } else {
                            $.messager.alert('提示', data.msg, 'error');
                           // return;
                           // alert(data.msg);
                    
                        }
                       
                    } 
                });
       })
    })

   
</script>

{include file="public/footer"/}